﻿<phone:PhoneApplicationPage 
    x:Class="Experiments.MichaelKappel.Net.Tilt.SimplePage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="768"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    shell:SystemTray.IsVisible="True">

    <Grid x:Name="LayoutRoot" Background="Transparent">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,0,0,10">
            <TextBlock x:Name="ApplicationTitle" Text="Michael Kappel, MCPD" Style="{StaticResource PhoneTextNormalStyle}"/>
            <TextBlock x:Name="PageTitle" Text="Accelerometer" Margin="9,-28,0,0" Style="{StaticResource PhoneTextTitle1Style}"/>
        </StackPanel>
        
        <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,-35,12,0">
            <StackPanel>
                <Canvas x:Name="cvsMain" Height="161" Margin="0,0,0,270">
                <Image Source="Images/arrows.png" Width="460" Height="460" Visibility="Visible" x:Name="imgXDegree" Canvas.Left="0" Canvas.Top="0" Canvas.ZIndex="4" d:IsLocked="True"   />

                    <Image Source="Images/arrowsX.png" Width="400" Height="400" Visibility="Visible" x:Name="imgSymbolX" Canvas.Left="32" Canvas.Top="35" Canvas.ZIndex="3" d:IsLocked="True"   >
                        <Image.Projection>
                            <PlaneProjection x:Name="ppSymbolX" />
                        </Image.Projection>
                    </Image>

                    <Image Source="Images/arrowsY.png" Width="400" Height="400" Visibility="Visible" x:Name="imgSymbolY" Canvas.Left="32" Canvas.Top="35" Canvas.ZIndex="2" d:IsLocked="True"   >
                        <Image.Projection>
                            <PlaneProjection x:Name="ppSymbolY" />
                        </Image.Projection>
                    </Image>

                    <Image Source="Images/arrowsZ.png" Width="400" Height="400" Visibility="Visible" x:Name="imgSymbolZ" Canvas.Left="32" Canvas.Top="35" Canvas.ZIndex="1" d:IsLocked="True">
                        <Image.Projection>
                            <PlaneProjection x:Name="ppSymbolZ" />
                        </Image.Projection>
                    </Image>
                </Canvas>
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="84" />
                        <RowDefinition Height="84" />
                        <RowDefinition Height="84" />
                        <RowDefinition Height="*" />
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="60" />
                        <ColumnDefinition Width="20" />
                        <ColumnDefinition Width="50" />
                        <ColumnDefinition Width="*" />
                        <ColumnDefinition Width="60" />
                    </Grid.ColumnDefinitions>

                    <CheckBox x:Name="cbxXVisible" Click="cbxXVisible_Click" IsChecked="True"  VerticalAlignment="Top" Background="Red" Grid.Row="0" Grid.Column="0" />
                    <ListBox  x:Name="ddlX" Foreground="Red" SelectedIndex="0" Grid.Row="0" Grid.Column="1" >
                        <ListBoxItem Foreground="DarkRed" Content="X" />
                        <ListBoxItem Foreground="DarkRed" Content="Y" />
                        <ListBoxItem Foreground="DarkRed" Content="Z" />
                    </ListBox>
                    <TextBlock  x:Name="txtX" Grid.Row="0" Grid.Column="2"  Foreground="Red"   />
                    <Slider x:Name="sX" Grid.Row="0" Grid.Column="3"  Height="84" Width="270" HorizontalAlignment="Right" Value="2" Foreground="Red" Background="Red" Maximum="8"  />
                    <CheckBox x:Name="cbxX" VerticalAlignment="Top" Background="Red" Grid.Row="0" Grid.Column="4" />

                    <CheckBox x:Name="cbxYVisible" Click="cbxYVisible_Click" IsChecked="True"  VerticalAlignment="Top" Background="Green" Grid.Row="1" Grid.Column="0" />
                    <ListBox x:Name="ddlY" Foreground="Green" SelectedIndex="1" Grid.Row="1" Grid.Column="1"  >
                        <ListBoxItem Foreground="DarkGreen" Content="X" />
                        <ListBoxItem Foreground="DarkGreen" Content="Y" />
                        <ListBoxItem Foreground="DarkGreen" Content="Z" />
                    </ListBox>
                    <TextBlock  x:Name="txtY" Grid.Row="1" Grid.Column="2"  Foreground="Green"   />
                    <Slider x:Name="sY" Grid.Row="1" Grid.Column="3" Height="84" Width="270" HorizontalAlignment="Right"  Value="2" Foreground="Green" Background="Green"  Maximum="8" />
                    <CheckBox x:Name="cbxY" VerticalAlignment="Top" Background="Green" Grid.Row="1" Grid.Column="4" />

                    <CheckBox x:Name="cbxZVisible" Click="cbxZVisible_Click" IsChecked="True" VerticalAlignment="Top" Background="Blue" Grid.Row="2" Grid.Column="0" />
                    <ListBox x:Name="ddlZ" Foreground="Blue" SelectedIndex="2" Grid.Row="2" Grid.Column="1"  >
                        <ListBoxItem Foreground="DarkBlue" Content="X" />
                        <ListBoxItem Foreground="DarkBlue" Content="Y" />
                        <ListBoxItem Foreground="DarkBlue" Content="Z" />
                    </ListBox>
                    <TextBlock  x:Name="txtZ" Grid.Row="2" Grid.Column="2"  Foreground="Blue"  />
                    <Slider x:Name="sZ"  Grid.Row="2" Grid.Column="3" Height="84" Width="270" HorizontalAlignment="Right"  Value="2" Foreground="Blue"  Background="Blue" Maximum="8" />
                    <CheckBox x:Name="cbxZ" VerticalAlignment="Top" Background="Blue" BorderBrush="Blue" BorderThickness="1" Grid.Row="2" Grid.Column="4" />

                    <TextBlock Grid.Row="3" HorizontalAlignment="Center" Grid.Column="3" Foreground="DarkGray" Text="Visible" FontSize="10" />
                    <TextBlock Grid.Row="3" HorizontalAlignment="Center" Grid.Column="0" Foreground="DarkGray" Text="Mapping" FontSize="10" />
                    <TextBlock Grid.Row="3" HorizontalAlignment="Center" Grid.Column="1" Foreground="DarkGray" Text="Reading" FontSize="10" />
                    <TextBlock Grid.Row="3" HorizontalAlignment="Center" Grid.Column="2" Foreground="DarkGray" Text="Degree Offset" FontSize="10" />
                    <TextBlock Grid.Row="3" HorizontalAlignment="Center" Grid.Column="3" Foreground="DarkGray" Text="Inverse" FontSize="10" />

                </Grid>
            </StackPanel>
        </Grid>
    </Grid>
</phone:PhoneApplicationPage>